﻿Public MustInherit Class TCustomMyObjects
    Protected Friend _DatabaseName As String
    Protected _List As New List(Of TCustomMyObject)
    Protected Friend _Owner As TMyDatabase
    Public MustOverride Sub Refresh()
    Public ReadOnly Property DatabaseName() As String
        Get
            Return _Owner.DatabaseName
        End Get
    End Property
    Friend Sub New(ByVal AOwner As TMyDatabase)
        _Owner = AOwner
    End Sub

    Friend ReadOnly Property MyQuery() As TMyQuery
        Get
            Return _Owner.MyQuery
        End Get
    End Property

    Friend ReadOnly Property Connection() As TMySession
        Get
            Return _Owner.Connection
        End Get
    End Property

    Default Public ReadOnly Property Items(ByVal Index As Integer) As TCustomMyObject
        Get
            Return _List(Index)
        End Get
    End Property

    Public ReadOnly Property Count() As Integer
        Get
            Return _List.Count
        End Get
    End Property

End Class
